package website.lhc.chapter1;

import lombok.extern.slf4j.Slf4j;

/**
 * 折扣
 * @author: longhc@citycloud.com.cn
 * @since: 2022/12/8 9:49
 * @version: 1.0
 */
@Slf4j
public class CashRebate implements CashSuper{

    private final double rebase;

    public CashRebate(double rebase) {
        this.rebase = rebase;
    }

    @Override
    public double acceptCash(double money) {
        return money * rebase;
    }
}
